<%@include file="header.jsp" %>
<%@page import="futbolfacil.modelo.Cancha"%>
<%@page import="futbolfacil.modelo.Horario"%>
<%@page import="java.util.Collection"%>
<%@page import="java.util.ArrayList"%>
<%@page import="futbolfacil.modelo.Local"%>
    <!-- content -->
    <div id="content">
      <div id="indent">
        <div class="wrapper">
          <div class="col-1">

            <div class="box">
              <%@include file="submenu.jsp" %>                          
            </div>
          </div>
          <div class="col-2">
            <div class="box-2">
             
                              <div class="inner">
                                <div class="wrapper">

                                    <h1>Horarios</h1>
                                    <div id="insert" style="width:600px;">
                                    <fieldset>
                                    <legend>Ingreso de Horarios</legend>
                                    
                                     <% 
                                    String valor = String.valueOf(request.getAttribute("valor")); 
                                    if (valor.equals("")) valor = "false";
                                    if (valor.equals("true")) { 
                                    %>
                                    <div id="errores" style="width:95%; padding:10px; border:solid 1px red; margin-top:10px; margin-bottom:10px; color:red; background:#f8f8ff;">
                                    	${msg1}                                    	
                                    </div>
                                    <% } %>
                                    
                                    <form onSubmit="return ValidaCampos();" name="frmHorario" method="post" action="HorarioServlet">
                                        <label>Local:</label>
	                                    <select id="cboLocal" name="cboLocal" onchange="cargarCanchas('#divCanchas');">
	                                     <option value="0">-Seleccione-</option>
		                                    <%	
		                                    ArrayList<Local> locales = (ArrayList<Local>) request.getAttribute("ListadoLocales");
		                                    if(locales != null){
			                                    for(Local x : locales){
				                                    out.println("<option value='"+ x.getCodigoLocal() +"' > "+ x.getDescripcionLocal() +"</option>");
			                                    }
		                                    }
		                                    %>
	                                    </select><br />	
	                                    <label>Cancha:</label>
	                                    <div id="divCanchas">
	                                    <select name="cboCancha">	
		                                 <option value="0">-Seleccione-</option>
	                                    </select>
	                                    </div><br />
	                                    <label>Dia:</label>
	                                    <select name="cboDia">
		                                    <option value="Lunes">Lunes</option>
		                                    <option value="Martes">Martes</option>
		                                    <option value="Miercoles">Miercoles</option>
		                                    <option value="Jueves">Jueves</option>
		                                    <option value="Viernes">Viernes</option>
		                                    <option value="Sabado">Sabado</option>
		                                    <option value="Domingo">Domingo</option>	
	                                    </select><br />	
	                                    <label>Hora Inicio:</label>
	                                    <select name="cboHoraInicio">	
		                                    <%		
 		                                    ArrayList<String> horasI = (ArrayList<String>) request.getAttribute("ListadoHoras");
		                                    if(horasI != null){
		                                    	for(String hora : horasI){ 
				                                    out.println("<option value='"+ hora.toString() +"' > "+ hora.toString() +"</option>");
			                                    }	
		                                    }		                                    
		                                    %>
	                                    </select><br />	
	                                    <label>Hora Fin:</label>
	                                    <select name="cboHoraFin">	
		                                    <%		
 		                                    ArrayList<String> horasF = (ArrayList<String>) request.getAttribute("ListadoHoras");
		                                    if(horasF != null){
		                                    	for(String hora : horasF){ 
				                                    out.println("<option value='"+ hora +"' > "+ hora +"</option>");
			                                    }	
		                                    }		                                    
		                                    %>
	                                    </select><br />	
	                                    <label>Precio:</label><input type="text" id="txtPrecio" name="txtPrecio" /><br />
	                                    <label>Promocion:</label>
	                                    <select name="cboPromocion">
		                                    <option value="0">No</option>
		                                    <option value="1">Si</option>	
	                                    </select><br />
	                                    <!-- <input type="checkbox"  id="chkPromocion" name="chkPromocion" /><br />  -->
	                                    <label>Inactivo:</label>
	                                    <select name="cboInactivo">
		                                    <option value="1">No</option>
		                                    <option value="0">Si</option>
	                                    </select><br />
	                                    <!--  <input type="checkbox" id="chkEstado" name="chkEstado"/><br />-->	
	                                    
	                                    <label>&nbsp;</label><input type="submit" name="submit1" value="Enviar" /> <input type="reset" name="reset1" value="Limpiar" />
                                    </form>
                                    </fieldset>
                                    </div>

                                    <div id="grid">
                                        <table class='tabla02' width='100%'>
		                                    <tr>
			                                    <th><strong>Campo1</strong></th>
			                                    <th><strong>Campo2</strong></th>
			                                    <th><strong>Campo3</strong></th>
			                                    <th><strong>Campo4</strong></th>
			                                    <th><strong>Accion</strong></th>
		                                    </tr>	
		                                    <tr>
			                                    <td>Data 1</td>
			                                    <td>Data 2</td>
			                                    <td>Data 3</td>
			                                    <td>Data 4</td>
			                                    <td>
				                                    <a href="javascript:void(0);" onClick="">Editar</a>
				                                    <a href="javascript:void(0);" onClick="">Eliminar</a>
			                                    </td>
		                                    </tr>
		                                    <tr>
			                                    <td>Data 1</td>
			                                    <td>Data 2</td>
			                                    <td>Data 3</td>
			                                    <td>Data 4</td>
			                                    <td>
				                                    <a href="javascript:void(0);" onClick="">Editar</a>
				                                    <a href="javascript:void(0);" onClick="">Eliminar</a>
			                                    </td>
		                                    </tr>
		                                    <tr>
			                                    <td>Data 1</td>
			                                    <td>Data 2</td>
			                                    <td>Data 3</td>
			                                    <td>Data 4</td>
			                                    <td>
				                                    <a href="javascript:void(0);" onClick="">Editar</a>
				                                    <a href="javascript:void(0);" onClick="">Eliminar</a>
			                                    </td>
		                                    </tr>
	                                    </table>
                                    </div>
                                </div>
              </div>
                            
            </div>
          </div>

        </div>
      </div>
    </div>
<%@include file="footer.jsp" %>